package week5th;

public class LinearNode<E>
{
    private LinearNode<E> previous;
    private LinearNode<E> next;
    private E element;

    public LinearNode() {
        previous = null;
        next = null;
        element = null;
    }

    public LinearNode(E elem) {
        previous = null;
        next = null;
        element = elem;
    }

    public LinearNode<E> getNext()
    {
        return next;
    }

    public void setNext(LinearNode<E> node)
    {
        next = node;
    }

    public E getElement()
    {
        return element;
    }

    public void setElement(E elem)
    {
        element = elem;
    }

    public LinearNode<E> getPrevious() {
        return previous;
    }

    public void setPrevious(LinearNode<E> previous) {
        this.previous = previous;
    }
}
